@import url('https://fonts.googleapis.com/css?family=Poppins:200i,400&display=swap');

/* 根，代表html */
:root {
    --color-white: #f3f3f3;
    --color-darkblue: #1b1b32;
    --color-darkblue-alpha: rgba(27, 27, 50, 0.8);
    --color-green: #37af65;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-white);
    margin: 0;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 作为背景 */
    z-index: -1;
    /* 作为图片备选方案（当遇到不支持linear-gradien的时候） */
    background: var(--color-darkblue);
    background-image: linear-gradient(
        105deg, 
      rgba(58, 58, 158, 0.8),
      rgba(136, 136, 206, 0.7)
      ), url(https://cdn.freecodecamp.org/testable-projects-fcc/images/survey-form-background.jpeg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.text-center {
    text-align: center;
}

.description {
    font-style: italic;
    font-weight: 200;
    /* 语法：text-shadow: h-shadow, v-shadow, blur, color 
    分别代表：水平阴影位置、垂直阴影位置、模糊距离、阴影颜色*/
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

h1 {
    font-weight: 400;
    line-height: 1.2;
}
  
p {
    font-size: 1.125rem;
}
  

h1, p {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.container {
    width: 100%;
    margin: 3.125rem auto 0 auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}
  
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

.header {
    margin-bottom: 1.875rem;
}

/* 表单 */

#survey-form {
    background-color: var(--color-darkblue-alpha);
    padding: 2.5rem 0.625rem;
    border-radius: 0.25rem;
}

@media (min-width: 480px) {
    #survey-form {
      padding: 2.5rem;
    }
}

.form-group {
    margin: 0 auto 1.25rem auto;
    padding: 0.25rem;
}

label {
    display: flex;
    align-items: center;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

/* 设置表单元素内文字样式 */
input,
button,
select,
textarea {
    /* 表单组件默认样式可能是已经设定好的，这里需要应用自定义样式 */
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.form-control {
    display: block;
    width: 100%;
    height: 2.375rem;
    padding: 0.375rem 0.75rem;
    color: #495057;
    /* background-clip: padding-box; */
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    /* 过渡效果，从未focus到focus */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(255, 0, 0, 0.5);
}

[type=radio], [type=checkbox] {
    display: inline-block;
    margin-right: 0.625rem;
    min-height: 1.25rem;
    min-width: 1.25rem;
}

.input-textarea {
    min-height: 120px;
    width: 100%;
    padding: 0.65rem;
    resize: vertical;
}

[type=submit] {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: var(--color-green);
    color: inherit;
    border-radius: 2px;
    cursor: pointer;
    /* 去除外边框 */
    border: none;
}